/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controllers;

import models.Administrador;
import models.Docente;
import play.mvc.Controller;
import play.mvc.With;

/**
 *
 * @author Administrador
 */
@With(Secure.class)
public class firstController extends Controller {

    static String username;
    static String periodo;
    static Docente docente;
    //--->
    static Administrador admin;

    public static void dispatcher() {

        username = Security.connected();
        session.clear();
        admin = Administrador.find("codigo", username).first();
        String controler;

        if (username.equals("999999")) {
            controler = "bienvenidaAdmin.index";
        } else {
            controler = "bienvenidaAlumno.index";
           // controler = "msgPeriodo.mensaje";
        }

        redirect(controler);
    }
}
